<%@ include file="../common/top.jsp"%>

<link rel="stylesheet" href="css/shop.css">

<style>
    .display{
        max-height: 650px;
        width: 500px;
        overflow-y: auto;
    }

    table{
        line-height: 30px;

        width: 500px;
    }
</style>

<div class="display">
    <center>
<h2 style="color: rgb(190, 158, 111);">My Orders</h2>

<table>
    <tr>
        <th>Order ID</th>
        <th>Date</th>
        <th>Total Price</th>
    </tr>

    <c:forEach var="order" items="${sessionScope.orderList}">
        <tr>
            <td>
                <a href="viewOrderForm?orderId=${order.orderId}&type='cart'" >${order.orderId}</a>
            </td>
            <td>
                ${order.orderDate}
<%--                <fmt:formatDate value="${order.orderDate}" pattern="yyyy/MM/dd" />--%>
            </td>
            <td>
                <fmt:formatNumber value="${order.totalPrice}" pattern="$#,##0.00" />
            </td>
        </tr>
    </c:forEach>
</table>
    </center>
</div>

